import 'package:flutter/material.dart';

class WImg extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("图片组件"),
        centerTitle: true,
      ),
      body: Container(
        child: Column(
          children: <Widget>[
            Text("网络图片"),
            Image(
              width: 100,
              height: 100,
              image: NetworkImage(
                  "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"),
            ),
            SizedBox(
              height: 10,
            ),
            Text("本地图片"),
            Image.asset(
              "images/img/img1.png",
              width: 100,
              height: 100,
            ),
            Text("圆形图片"),
            ClipOval(
              child: Image.network(
                'http://img1.touxiang.cn/uploads/20130202/02-052330_21.jpg',
                width: 120,
                height: 120,
                fit: BoxFit.cover,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
